#ifndef _TOOLS_F_
#define _TOOLS_H_
#include <cstddef>
#include <cstdint>
#include <vector>

class Tools {
 public:
  // 计算CRC16校验
  static uint16_t CalculateCRC(const uint8_t* data, size_t length);
  // 检查CRC校验
  static bool CheckCRC(const std::vector<uint8_t>& data, size_t length);
  // 打印数据帧
  static void PrintData(const std::vector<uint8_t>& data);
};

#endif